package cn.akwing.sms.controller;

import cn.akwing.sms.pojo.Timetable;
import cn.akwing.sms.service.TimetableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController

public class TimetableController {
    @Autowired
    private TimetableService timetableService;

    @RequestMapping(value = "/getTimetables")
    public ArrayList<Timetable> getTimetables(){
        System.out.println(timetableService.getTimetables().get(0));
        return timetableService.getTimetables();
    }
}
